package cn.dakaqi.group.services;

import cn.dakaqi.entities.GroupVolunteer;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

/**
 * Created by chunyang on 2016/4/16.
 */
public interface GroupVolunteerDao  extends PagingAndSortingRepository<GroupVolunteer, Long>, JpaSpecificationExecutor<GroupVolunteer>
{
    @Query(nativeQuery = true,value = "select count(ID) from U_GROUP_VOLUNTEER where DEL_STATUS =0 and GROUP_ID =:GROUP_ID and STATUS =:STATUS")
    int counts(@Param("GROUP_ID") Long GROUP_ID,@Param("STATUS") int STATUS);
}
